package com.itdachang.design.creatation.builder;

/**
 * @author gcq
 * @Create 2022-02-08
 */
public class XiaoMiBuilder extends AbstractBuilder {

    public XiaoMiBuilder() {
        phone = new Phone();
    }

    /**
     * 链式调用 返回本体
     */

    @Override
    AbstractBuilder customCpu(String cpu) {
        phone.cpu = cpu;
        return this;
    }

    @Override
    AbstractBuilder customMem(String mem) {
        phone.mem = mem;
        return this;
    }

    @Override
    AbstractBuilder customDisk(String disk) {
        phone.disk = disk;
        return this;
    }

    @Override
    AbstractBuilder customCam(String cam) {
        phone.cam = cam;
        return this;
    }
}